package com.jindianjichi.common.enums;

import lombok.Getter;

@Getter
public enum UserStatusEnum {

    OPEN(0, "启用"),
    CLOSE(1, "禁用")
    ;

    private Integer code;
    private String desc;

    UserStatusEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public  static UserStatusEnum getByCode(Integer code){
        for (UserStatusEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
